package com.liang.date;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateDemo {
    public static void main(String[] args) {
        Date date = new Date();
        System.out.println(date);

        Date date2 = new Date(0L);
        System.out.println(date2);

        long time = date.getTime();
        System.out.println(time);

        date.setTime(3600L*1000);
        System.out.println(date);

        SimpleDateFormat day = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");


        System.out.println(day.format(date));
    }
}
